package com.jishuo.nontax.web;

import com.jishuo.base.annotation.UserAuthority;
import com.jishuo.base.bean.BaseResult;
import com.jishuo.nontax.bfc.service.OnlineOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @auther dinggaofei
 * @Date 2023/3/2 17:04
 */
@Slf4j
@Controller
@RequestMapping(value = "/query/onlineorder", name = "")
@UserAuthority(menu = {"query/onlineorder"})
public class OnlineOrderController {
    @Resource
    private OnlineOrderService onlineOrderService;

    private String prefix = "query/";


    @RequestMapping(value = {"onlineorder", "onlineorder/{page}"}, method = {RequestMethod.GET,RequestMethod.POST})
    public String index(@PathVariable(required = false) String page) {
        return prefix + ((page == null) ? "onlineorder" : page);
    }


    @ResponseBody
    @RequestMapping(value = "selonlineorder", method = {RequestMethod.GET,RequestMethod.POST})
    public BaseResult selonlineorder(String paybankdt){
        return new BaseResult(onlineOrderService.queryOnlineOrder(paybankdt));
    }

}
